﻿using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;

namespace Ocelot.Admin.Api.Core
{
    /// <summary>
    /// 字典
    ///</summary>
    [SugarTable("Dictionary")]
    public class Dictionary
    {
        /// <summary>
        /// 主键Id 
        ///</summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 字典名称 
        ///</summary>
        [SugarColumn(ColumnName = "DictionaryName")]
        public string DictionaryName { get; set; }

        /// <summary>
        /// 字典类型 
        ///</summary>
        [SugarColumn(ColumnName = "DictionaryType")]
        public string DictionaryType { get; set; }

        /// <summary>
        /// 路由地址配置
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(DictionaryItem.DictionaryId))]
        public List<DictionaryItem> DictionaryItems { get; set; }
    }
}
